<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // function Chess(name, color, x, y) {
        //     this.color = color
        //     this.name = name
        //     this.x = x
        //     this.y = y
        // }

        // //一个类的原型对象上的数据会被这个类的实例所继承
        // Chess.prototype.move = function (x, y) {
        //     this.x = x
        //     this.y = y
        // }

        // let ma = new Chess('马', '红', 4, 5)
        // ma.move(11, 22)
        // console.log(ma);

    </script>
</body>

</html>